package com.freecat.xmqgct.app;

import android.app.Application;
import android.content.Context;
import android.support.annotation.NonNull;

import com.freecat.xmqgct.BuildConfig;

import butterknife.ButterKnife;
import me.jessyan.art.base.delegate.AppLifecycles;
import timber.log.Timber;

/**
 * 作者：ChenPeng
 * 时间：2019/9/16
 * 注释：application生命周期管理类
 * @author ChenPeng
 */
public class AppLifecycleImp implements AppLifecycles {
    @Override
    public void attachBaseContext(@NonNull Context base) {
    }

    @Override
    public void onCreate(@NonNull Application application) {
        if (BuildConfig.DEBUG) {//Timber初始化
            Timber.plant(new Timber.DebugTree());
            ButterKnife.setDebug(true);
        }

    }

    @Override
    public void onTerminate(@NonNull Application application) {

    }
}
